.class public Lcom/uucun/adsdk/c/k;
.super Lcom/uucun/adsdk/c/j;


# static fields
.field public static a:Ljava/lang/String;


# instance fields
.field private d:Landroid/content/Context;

.field private e:Landroid/app/Notification;

.field private f:I

.field private g:Landroid/app/NotificationManager;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-class v0, Lcom/uucun/adsdk/c/k;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/uucun/adsdk/c/k;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/uucun/adsdk/c/j;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    iput-object p2, p0, Lcom/uucun/adsdk/c/k;->b:Ljava/lang/String;

    return-void
.end method

.method private a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
    .locals 3

    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, p2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    invoke-virtual {v0, p4}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    const-string v1, "\u53d6\u6d88"

    new-instance v2, Lcom/uucun/adsdk/c/d;

    invoke-direct {v2, p0}, Lcom/uucun/adsdk/c/d;-><init>(Lcom/uucun/adsdk/c/k;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    invoke-virtual {v0, p3, p5}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    return-object v0
.end method

.method static synthetic a(Lcom/uucun/adsdk/c/k;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    return-object v0
.end method

.method private b(Lcom/uucun/adsdk/d/c;)V
    .locals 5

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    const-string v1, "notification"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Lcom/uucun/adsdk/c/k;->g:Landroid/app/NotificationManager;

    new-instance v0, Landroid/app/Notification;

    invoke-direct {v0}, Landroid/app/Notification;-><init>()V

    iput-object v0, p0, Lcom/uucun/adsdk/c/k;->e:Landroid/app/Notification;

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->e:Landroid/app/Notification;

    const v1, 0x1080082

    iput v1, v0, Landroid/app/Notification;->icon:I

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->e:Landroid/app/Notification;

    const/16 v1, 0x10

    iput v1, v0, Landroid/app/Notification;->flags:I

    invoke-static {}, Ljava/lang/Math;->random()D

    move-result-wide v0

    const-wide v2, 0x40c3880000000000L

    mul-double/2addr v0, v2

    double-to-int v0, v0

    iput v0, p0, Lcom/uucun/adsdk/c/k;->f:I

    iget-object v0, p1, Lcom/uucun/adsdk/d/c;->c:Ljava/lang/String;

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v1, v2, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    const/high16 v0, 0x1000

    invoke-virtual {v1, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    const/4 v2, 0x0

    const/high16 v3, 0x400

    invoke-static {v0, v2, v1, v3}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    iget-object v1, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    invoke-static {v1}, Lcom/uucun/adsdk/b/b;->h(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/uucun/adsdk/c/k;->e:Landroid/app/Notification;

    iget-object v3, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    iget-object v4, p1, Lcom/uucun/adsdk/d/c;->b:Ljava/lang/String;

    invoke-virtual {v2, v3, v1, v4, v0}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->g:Landroid/app/NotificationManager;

    iget v1, p0, Lcom/uucun/adsdk/c/k;->f:I

    iget-object v2, p0, Lcom/uucun/adsdk/c/k;->e:Landroid/app/Notification;

    invoke-virtual {v0, v1, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    return-void
.end method

.method private c(Lcom/uucun/adsdk/d/c;)V
    .locals 6

    iget-object v1, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    const-string v2, "\u66f4\u65b0\u63d0\u793a"

    const-string v3, "\u66f4\u65b0"

    iget-object v4, p1, Lcom/uucun/adsdk/d/c;->b:Ljava/lang/String;

    new-instance v5, Lcom/uucun/adsdk/c/e;

    invoke-direct {v5, p0, p1}, Lcom/uucun/adsdk/c/e;-><init>(Lcom/uucun/adsdk/c/k;Lcom/uucun/adsdk/d/c;)V

    move-object v0, p0

    invoke-direct/range {v0 .. v5}, Lcom/uucun/adsdk/c/k;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)Lcom/uucun/adsdk/d/c;
    .locals 1

    invoke-static {p1}, Lcom/uucun/adsdk/b/i;->a(Ljava/lang/String;)Lcom/uucun/adsdk/d/c;

    move-result-object v0

    return-object v0
.end method

.method protected varargs a([Lorg/json/JSONObject;)Lcom/uucun/adsdk/d/c;
    .locals 3

    const/4 v2, 0x0

    const/4 v0, 0x0

    :try_start_0
    aget-object v0, p1, v0

    const-string v1, "app_key"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    move-object v0, v2

    :goto_0
    return-object v0

    :cond_1
    const/4 v0, 0x0

    aget-object v0, p1, v0

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/c/k;->a(Lorg/json/JSONObject;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/uucun/adsdk/d/c;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-object v0, p0

    goto :goto_0

    :catch_0
    move-exception v0

    sget-object v1, Lcom/uucun/adsdk/c/k;->a:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/uucun/adsdk/b/h;->a(Ljava/lang/String;Ljava/lang/String;)V

    move-object v0, v2

    goto :goto_0
.end method

.method protected a(Lcom/uucun/adsdk/d/c;)V
    .locals 3

    if-nez p1, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    const/4 v0, 0x0

    iget-object v1, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    instance-of v1, v1, Landroid/app/Activity;

    if-eqz v1, :cond_2

    iget-object v0, p0, Lcom/uucun/adsdk/c/k;->d:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    :cond_2
    const-string v1, "1"

    iget-object v2, p1, Lcom/uucun/adsdk/d/c;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    if-eqz v0, :cond_3

    invoke-virtual {v0}, Landroid/app/Activity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_3

    invoke-direct {p0, p1}, Lcom/uucun/adsdk/c/k;->c(Lcom/uucun/adsdk/d/c;)V

    goto :goto_0

    :cond_3
    invoke-direct {p0, p1}, Lcom/uucun/adsdk/c/k;->b(Lcom/uucun/adsdk/d/c;)V

    goto :goto_0
.end method

.method public bridge synthetic b(Ljava/lang/String;)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/k;->a(Ljava/lang/String;)Lcom/uucun/adsdk/d/c;

    move-result-object v0

    return-object v0
.end method

.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    check-cast p1, [Lorg/json/JSONObject;

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/k;->a([Lorg/json/JSONObject;)Lcom/uucun/adsdk/d/c;

    move-result-object v0

    return-object v0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0

    check-cast p1, Lcom/uucun/adsdk/d/c;

    invoke-virtual {p0, p1}, Lcom/uucun/adsdk/c/k;->a(Lcom/uucun/adsdk/d/c;)V

    return-void
.end method
